package com.mi.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mi.system.dto.request.MenuRequestDTO;
import com.mi.system.entity.Menu;
import com.mi.system.vo.MenuVO;

import java.util.List;

/**
 * Menu service
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2021/11/1 13:55
 */
public interface MenuService extends IService<Menu> {

    /**
     * Get menu tree
     *
     * @return menu tree
     */
    List<MenuVO> getMenuTree();

    /**
     * 获取当前用户菜单树
     *
     * @return 用户菜单树
     */
    List<MenuVO> getUserMenuTree();

    /**
     * save menu
     *
     * @param request menu info
     * @return result
     */
    boolean saveMenu(MenuRequestDTO request);

    /**
     * update menu
     *
     * @param id      menu id
     * @param request menu info
     * @return result
     */
    boolean updateMenu(Long id, MenuRequestDTO request);

    /**
     * remove menu
     *
     * @param id menu id
     * @return result
     */
    Menu removeMenu(Long id);
}
